/**
 * 
 */
package com.rostami.tutorial.spring.beanFactory;

import org.springframework.beans.BeansException;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

/**
 * @author Alireza
 *
 */
public class BeanFactoryPostProcessorImplemented implements
		BeanFactoryPostProcessor {

	/* (non-Javadoc)
	 * @see org.springframework.beans.factory.config.BeanFactoryPostProcessor#postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory)
	 */
	@Override
	public void postProcessBeanFactory(
			ConfigurableListableBeanFactory beanFactory) throws BeansException {
		BeanDefinition beanDefinition = beanFactory.getBeanDefinition("beanFactoryPostProcessorBean");
		MutablePropertyValues mutablePropertyValues = beanDefinition.getPropertyValues();
		mutablePropertyValues.addPropertyValue("message", " message from BeanFactoryPostProcessorImplemented (it is override from this class)");

	}

}
